class Reverse{
	private int strLength;
	private String input;
	private String output;
	
	public Reverse(String input){
		this.input = input;
		output = "";
		strLength = input.length();
	}
	
	public String Convert(){
		Stack stack = new Stack(strLength);
		
		for(int i = 0; i < strLength; i++){
			stack.push(input.charAt(i));
		}
		
		while(!stack.isEmpty()){			
			output += stack.pop();
		}
		
		return output;
	}
}